package net.qmgyl.demos.shardingjdbc;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

/**
 * Hello world!
 *
 * @author xzw
 */
@SpringBootApplication
@MapperScan(basePackages = {"net.qmgyl.demos.shardingjdbc.infrastructure.mapper"})
public class ShardingJdbcDemoApp {
    public static void main(String[] args) {
        SpringApplication.run(ShardingJdbcDemoApp.class);
    }

    @Bean
    public PaginationInterceptor paginationInterceptor() {
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        paginationInterceptor.setLimit(-1L);
        return paginationInterceptor;
    }
}
